<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增车辆')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-vehicle-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">所属公司ID：</label>
                <div class="col-sm-8">
                    <input name="ownerCompanyId" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">车牌号：</label>
                <div class="col-sm-8">
                    <input name="licensePlateNumber" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">企业自编号：</label>
                <div class="col-sm-8">
                    <input name="companyPlateNumber" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">车辆上线日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="onlineDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">车辆营运证号：</label>
                <div class="col-sm-8">
                    <input name="operationCertificateNumber" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">营运证有效期 (年数)：</label>
                <div class="col-sm-8">
                    <input name="operatingPeriod" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">灭火弹到期日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="extinguisherExpiryDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否包含自动爆裂装置：</label>
                <div class="col-sm-8">
                    <select name="automaticExplosiveDevice" class="form-control m-b" th:with="type=${@dict.getType('true_false')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">防火锤数量：</label>
                <div class="col-sm-8">
                    <input name="numberOfFireHammer" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">安全锤数量：</label>
                <div class="col-sm-8">
                    <input name="numberOfSafetyHammer" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否包含消防细水雾：</label>
                <div class="col-sm-8">
                    <select name="fireFog" class="form-control m-b" th:with="type=${@dict.getType('true_false')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">驾驶室类型：</label>
                <div class="col-sm-8">
                    <select name="cabTypeId" class="form-control m-b" th:with="type=${@dict.getType('driveroom_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">车辆踏步等级：</label>
                <div class="col-sm-8">
                    <select name="stepGradeId" class="form-control m-b" th:with="type=${@dict.getType('step_rank')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否有广告屏：</label>
                <div class="col-sm-8">
                    <select name="adLed" class="form-control m-b" th:with="type=${@dict.getType('true_false')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "bussiness/vehicle"
        $("#form-vehicle-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-vehicle-add').serialize());
            }
        }

        $("input[name='onlineDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='extinguisherExpiryDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>